function blk_type = vm_map_dct_blk(blk)

nuy1 = 125;
nuy2 = 900;
alpha1 = 2.3;
beta1 = 1.6;
alpha2 = 1.4;
beta2 = 1.1;
gamma = 4;
k = 290;

d = dct2(blk);
M = [1 2 2 3 3 3 3 4;
     2 2 3 4 4 4 4 4;
     2 3 3 4 4 4 4 4;
     3 4 4 3 4 4 4 4;
     3 4 4 4 4 4 4 4;
     3 4 4 4 4 4 4 4;
     3 4 4 4 4 4 4 4;
     4 4 4 4 4 4 4 4];
DC = sum(abs(d(M==1)));
L = sum(abs(d(M==2)));
E = sum(abs(d(M==3)));
H = sum(abs(d(M==4)));

A = E + H > nuy1;
B = E + H > nuy2;
C2 = (L/E >= alpha2 && (L+E)/H >= beta2) ||...
    (L/E >= beta2 && (L+E)/H >= alpha2) ||...
    (L+E)/H >= gamma;
C1 = (L/E >= alpha1 && (L+E)/H >= beta1) ||...
    (L/E >= beta1 && (L+E)/H >= alpha1) ||...
    (L+E)/H >= gamma;
D = E + H > k;

if A
    if B
        if C2
            blk_type = 1;%EDGE
        else
            blk_type = 4;%TEXTURE
        end
    else
        if C1
            blk_type = 1;
        elseif D
            blk_type = 4;
        else
            blk_type = 0;
        end
    end    
else
    blk_type = 0;%BLANK;
end
end